home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 18125 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: inforamp.net!usenet
  2. From: rmorin@inforamp.net (Randy Charles Morin)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: newbie help with 2-d arrays please ?
  5. Date: Fri, 19 Apr 1996 03:23:09 GMT
  6. Organization: InfoRamp Inc., Toronto, Ontario (416) 363-9100
  7. Message-ID: <4l6mei$ah3@sam.inforamp.net>
  8. References: <4kvla7$516@pipe9.nyc.pipeline.com>
  9. NNTP-Posting-Host: ts47-12.tor.istar.ca
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. gniemcew@nyc.pipeline.com (Gabriel Niemcewicz) wrote:
  13.  
  14. >I am currently writing a project on graphs and I encountered something I
  15. >cannot figure out when writing adjacency matrix representation: 
  16. >    table = new int [temp_size][temp_size]; // this gives me errors about
  17. >Any suggestions ? I would appreciate some feedback. 
  18.  
  19. try
  20.  
  21. int ** table;
  22. table = new int * [temp_size];
  23. for (int i=0;i<temp_size;i++)
  24.     table[i] = new int;
  25.  
  26. or something like that;
  27.  
  28.  
  29. Agrivar
  30.  
  31. aka Randy Charles Morin,
  32. MiddleWorld SoftWare,
  33. Satisfying Your Bit and Bytes,
  34. Canada 1-800-363-3780 
  35. Other  1-905-279-2087
  36. eMail  rmorin@inforamp.net
  37.  
  38.